﻿
@{
    Layout = null;
}
@model LeadThing.AbpZeroTemplate.Web.Models.Home.MapIndexViewModel

<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
    <title>莒县综治工作中心信息化管理系统</title>
    <link href="~/Content/Map/css/alert.css" rel="stylesheet" />
    <link href="~/libs/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
    <link href="~/libs/swiper/swiper.min.css" rel="stylesheet" />
    <link href="~/Content/Map/css/newTemplate.css" rel="stylesheet" />
    <link rel="icon" href="~/Content/Map/images/icon.png" type="images/png">

    <script type="text/javascript" src="~/Scripts/map/jquery1.9.1.min.js"></script>
    <script type="text/javascript" src="~/Scripts/map/bootstrap.min.js"></script>
    <script src="~/libs/swiper/swiper.min.js"></script>
    <script type="text/javascript" src="~/Scripts/map/base/base.js"></script>
    <script type="text/javascript" src="~/Scripts/map/common/portal.js"></script>
    <script type="text/javascript" src="~/Scripts/map/common/topPageMap.js"></script>
    <script type="text/javascript" src="~/Scripts/videomeeting/base64.js"></script>
    <script type="text/javascript" src="~/Scripts/videomeeting/FastMeeting.js"></script>
    <script type="text/javascript">
        $(function () {
            (function () {
                var urls = location.href.split('?');
                if (urls.length > 1) {
                    var params = urls[1];
                    var mh = params.match(/(p=1)&?/);
                    if (!!mh) {
                        var usrid = getCookie("USERID") || "";
                        var usrname = getCookie("USERNAME") || "游客";
                        $("#iframe_").attr("src", "http://www.sdmap.gov.cn/publishmapClient/map.html?_t=" + (Math.random() + "").replace(/0\.0*/, "") + "&id=" + usrid + "&n=" + usrname);
                        changeNavActive(2);
                        return;
                    }
                }
                changeNavActive(1);
                $("#iframe_").attr({ "src": "MapMain?_t=" + (Math.random() + "").replace(/0\.0*/, "") });
            })();

            $(function () {
                $("#d_kf").hover(function () {
                    $("#qrcode").stop().slideToggle();
                });
            });
            $(function () {
                $("#myCtrl").click(function () {
                    $("#myModal").toggle();
                });
                $(".close").click(function () {
                    $("#myModal").hide();
                });

            });
        });
        function openShineProject() {
            IsHadAdmin();
            //$.ajax({
            //    type: "GET",
            //    url: "GetCurrentIP",
            //    dataType: "json",
            //    success: function (result) {
            //        var data = result.result;
            //        console.log(data)
            //        if (data.indexOf("172.19.") > -1) {
            //            IsHadAdmin();
            //        } else {
            //            openAlertModal("IP为" + data+"，无法访问该模块！");
            //        }
            //    },
            //    error: function (b, a) {
            //        console.log && console.log("获取数据失败" + a)
            //    }
            //});
        }
        function IsHadAdmin(type) {
            $.ajax({
                type: "GET",
                url: "GetRoleName",
                dataType: "json",
                success: function (result) {
                    var role = result.result;
                    if (role == "管理员") {
                        if (type == "commandDispatches")
                            window.open("../Application/Index#!/commandDispatches");
                        else if (type == "userMeetingRefs")
                            window.open("../Application/Index#!/userMeetingRefs");
                        else
                            window.open("http://172.19.21.110/");
                    } else {
                        openAlertModal("需要管理员权限！");
                    }
                },
                error: function (b, a) {
                    console.log && console.log("获取数据失败" + a)
                }
            });
        }

        //打开模态框
        function openAlertModal(message) {
            $("#alertModal p").empty();
            $("#alertModal p").text(message);
            $("#alertModal").modal("show");
        }
    </script>
</head>
<body style="height:100%;width:100%;overflow:hidden;" oncontextmenu="return false;">
    <div id="topDiv">
        <div id="D_Top" class="DIVtop">
            <div id="D_left">
                <div id="D_logo" onclick="gotoHomePage();"></div>
            </div>
            <div id="D_right"></div>
            <div style="clear:both;"></div>
        </div>
        <div id="D_menu" class="TopSpan">
            <ul id="nav" class="clearfix">
                <li>
                    <div id="d_kf">
                        <div id="qrcode">
                            <img src="~/Content/Map/images/qrcode.png" alt="APP二维码图片" />
                        </div>
                    </div>
                    <a>APP下载</a>
                </li>
                <li onclick='javaScript:window.open("../Application/Index#!/supportingSystems");'>
                    <div id="d_yj"></div>
                    <a>风险评估</a>
                </li>
                <li onclick='IsHadAdmin("commandDispatches");'>
                    <div id="d_sx"></div>
                    <a>指挥调度</a>
                </li>
                @*<li onclick='javaScript:window.open("http://218.56.29.192:8081/userMgr/entermeeting.jsp?roomID=10000&userName=admin&userType=1&roomPwd=123456");'><div id="d_yy"></div><a>视频会议</a></li>*@
                <li onclick='IsHadAdmin("userMeetingRefs");'>
                    <div id="d_yy"></div>
                    <a>视频会议</a>
                </li>
                <li onclick='javaScript:window.open("../Application/Index#!/disputeInformations");'>
                    <div id="d_zy"></div>
                    <a>矛盾纠纷</a>
                </li>
                <li onclick='openShineProject();'>
                    <div id="d_zt"></div>
                    <a>雪亮工程</a>
                </li>
                <li onclick='javaScript:window.open("../Application/Index#!/areas");'>
                    <div id="d_map"></div>
                    <a class="now">网格管理</a>
                </li>
                <li id="myCtrl">
                    <div></div>
                    <a>平台首页</a>
                </li>
            </ul>
        </div>
        <!-- Modal -->
        <div id="myModal" style="display:none; width: 100%;height: 100%;background: rgba(0,0,0,.6);position:absolute;left:0;top:0;z-index:1;">
            <div class="modal-dialog" role="document" style="width: 1080px;margin: 100px auto auto;">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" style="opacity: 1;">
                            <span>
                                <img src="~/Common/Images/close.png" style="width: 24px;height: auto;" />
                            </span>
                        </button>
                        <h4 class="modal-title" id="myModalLabel">示意图展示</h4>
                    </div>
                    <div class="modal-body">
                        <img src="~/Common/Images/alert.png" style="width: 100%;height: auto;" />
                    </div>
                </div>
            </div>
        </div>

        <!--提示弹出框-->
        <div id="alertModal" class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog">
            <div class="modal-dialog" role="document" style="width: 400px;">
                <div class="modal-content">
                    <div class="modal-header" style="background: #52adfb;">
                        <h4 class="modal-title" style="color: #ffffff;font-family: 'Microsoft YaHei';font-size:18px;">提示</h4>
                    </div>
                    <div class="modal-body">
                        <p>请先选择左侧菜单模块，再进行搜索！</p>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                    </div>
                </div><!-- /.modal-content -->
            </div><!-- /.modal-dialog -->
        </div><!-- /.modal -->

        <div class="Top_User">
            <div id="userImg"></div>
            @if (Model.LoginInformations != null)
            {
                <a id="login" href="@Url.Action("Index", "Application")" target="_blank">@Model.GetShownLoginName()</a>
            }
            else
            {
                <a href="@Url.Action("Login", "Account")">@L("LogIn")</a>
            }
            <div id="splitImg"></div>
            <a href="@Url.Action("Logout", "Account")" style="top: 1px;margin-right: 15px; color:#fff">@L("Logout")</a>
        </div>
    </div>
    <div id="content" data-calc-height="100%-100" style='height: 100%;width: 100%;'>
        <iframe id="iframe_" style='width:100%;height:100%;' frameborder='0' border='0' marginwidth='0' marginheight='0' scrolling='no'></iframe>
        <iframe id="id_iframe" name="id_iframe" style="display:none;" src=""></iframe>
    </div>
</body>
</html>
